home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / think / MADgic41.lzh / 1988 / cowboy.s < prev    next >
Text File  |  1989-10-04  |  3KB  |  81 lines

  1. ;Cowboy
  2. ;by Eugene P. Lilitko
  3. ;Union of Soviet Socialist Republics
  4. ;
  5. ;The snare for the opponent's processes.
  6. ;Bison commits suicide when all 64 processes are captured.
  7. ;
  8. FIRE          DAT                    FIRE
  9. BEG           DAT                    BEG
  10. FENCE         MOV      SUCCESS,       SWITCH
  11. DEMON         SUB   #  1,             BISON
  12. HELP          SPL                    DEMON
  13. BOMBING       MOV      FIRE,       <  FIRE
  14.               JMN      HELP,          BISON
  15.               MOV      BOMB,          HELP
  16. BOMB          DAT                    BOMB
  17. BISON         DAT                    64
  18. COUNT         JMP      FENCE
  19. ;Welcome to the snare!
  20. ;
  21. WELLC1        JMP   <  WELLC1
  22. WELLC2        JMP   @  WELLC2
  23. ;The main code.  Traps are set, inviting the opponent to jump
  24. ;into the snare.  When the bison are captured, SWITCH is changed
  25. ;to the instructions of SUCCESS.
  26. ;
  27. START         MOV      REST,          SWITCH
  28. GBOMB         MOV   #  575,           FIRECNT
  29.               MOV   #  64,            BISON
  30.               SPL                    RADAR
  31. CONT          MOV   #  4098,          WELLC1
  32.               MOV   # -4099,          WELLC2
  33. LOOP          MOV      WELLC1,     @  WELLC2
  34.               MOV      WELLC2,     @  WELLC1
  35.               ADD   #  7,             WELLC1
  36.               SUB   #  7,             WELLC2
  37. SWITCH        DJN      LOOP,          FIRECNT
  38. ;All right! There are bison in the snare.  The captured bison invite free
  39. ;bison into the trap.  Cowboy must help them!
  40. ;
  41. NEW           MOV      BOMB,          FIRE
  42.               MOV      BOMB,          KILL
  43. SHOOT         MOV      FIRE,       <  FIRE
  44.               JMZ      SHOOT,         KILL
  45. FORWARD       JMP      NEW
  46. SUCCESS       MOV      GBOMB,         SUCCESS
  47. REST          DJN      SHOOT,         COPY+3
  48. ;The defense process.  Build a set of pickets, test for a breach of the
  49. ;pickets, and switch to defensive action when the pickets are breached.
  50. ;Defense occurs when Cowboy is copied to a new place in memory, and the
  51. ;copy begins operating properly.
  52. ;
  53. RADAR         MOV   #  638,           FORWARD
  54.               MOV   # -638,           BACK
  55.               MOV   #  25,            COUNT
  56. MAKE          MOV      COUNT,      <  FORWARD
  57.               MOV      COUNT,      <  BACK
  58.               DJN      MAKE,          COUNT
  59. TEST          MOV   #  638,           FORWARD
  60.               MOV   # -638,           BACK
  61.               MOV   #  25,            COUNT
  62. COMPARE       CMP   <  FORWARD,    <  BACK
  63. BACK          JMP      ALARM
  64. KILL          DJN      COMPARE,       COUNT
  65. FIRECNT       JMP      TEST
  66. ALARM         MOV      BOMB,          SWITCH
  67.               MOV   #  50,            BEG
  68.               MOV   #  3310,          FORWARD
  69. COPY          MOV   @  BEG,        <  FORWARD
  70.               DJN      COPY,          BEG
  71.               MOV      NEW,           BOMBING
  72.               ADD   #  11,            FORWARD
  73. FINISH        JMP   @  FORWARD
  74.               END      START